package cn.aitrox.ry.service.auth.controller;

import cn.aitrox.ry.bean.RespResult;
import cn.aitrox.ry.service.auth.api.AuthResourceApi;
import cn.aitrox.ry.service.auth.dto.resource.out.AuthResourceDetailDto;
import cn.aitrox.ry.service.auth.service.AuthResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class AuthResourceController implements AuthResourceApi {

    @Autowired
    private AuthResourceService authResourceService;

    @GetMapping(value = "/auth/resource/all")
    @Override
    public List<AuthResourceDetailDto> all() {
        return authResourceService.all();
    }
}
